home *** CD-ROM | disk | FTP | other *** search
-
- !BootA Version 2.00 - 15 December 1991
- --------------------------------------
-
- CONTENTS OF THE BOOTA_ETC ARCHIVE
-
- The BootA_Etc archive contains the !BootA application plus
- several other applications which provide examples of how to use
- !BootA. This document is also present in the archive. A read-only
- version of the Archive Filing System (ArcFS) is also provided,
- allowing you to run the example applications directly from the
- archive (the full read/write version of ArcFS is available from
- David Pilling, PO Box 22, Thorton Cleveleys, Blackpool, FY5 1LR).
-
- To do this, first double click on the ArcFS icon to install the
- filing system, then double click on the BootA_Etc icon. A filer
- window will open showing the contents of the archive. You can now
- run applications directly from the archive in the same way as
- from any other filer window.
-
- If you want to unpack the entire contents of the archive to
- another disk, it will require approximately 900K of disk space.
- However, in order to get working versions of !BootA and the
- example applications, you do not need to copy the 'C-source' or
- 'Unshared' directories. Without these, you will need less than
- 500K of disk space to accomodate !BootA and accompanying example
- applications.
-
-
- PURPOSE OF THIS DOCUMENT
-
- This document is intended to provide an introduction to the
- !BootA application. The !Help file in the !BootA application
- directory provides reference information on using !BootA once you
- have read this introduction.
-
-
- INTRODUCTION TO !BOOTA
-
- !BootA is a RISC OS desktop application which provides a simple
- front-end for running non WIMP-based applications and utilities
- as if they themselves were proper desktop applications.
-
- Such utilities would normally have to be started by command
- outside the desktop environment, or from within an !Edit task
- window, or at the very least by pressing f12 in the desktop in
- order to enter the command.
-
- By using !BootA as a front-end, the application or utility looks
- very much like any normal RISC OS desktop application. It has an
- application directory on which you double click to install the
- application on the icon bar, and you can then drag files to this
- icon for processing by the application.
-
- All the applications accompanying !BootA (e.g. !Lock, !UnLock,
- etc) are actually examples of using !BootA as a front-end for non
- Wimp-based applications. These are referred to below (and in the
- !BootA !Help file) as 'client applications' to emphasise that
- they rely on !BootA to do many of the things for them that a real
- RISC OS desktop application does for itself.
-
-
- TRYING OUT !BOOTA
-
- The !BootA application itself is set up so that when you double
- click on it, you install all these example 'client applications'.
- Normally, you would never do this. Rather, you would double click
- on whichever individual 'client application' you wanted to
- install. This would automatically start up !BootA, although no
- icon for !BootA itself would appear on the icon bar, only the
- icon for the client application.
-
- However, on this occasion, to get a feel for the use of !BootA,
- double click on the !BootA icon to install the icons for all the
- example client applications. Then click the mouse menu button
- over these icons one by one, chosing 'Help' for each one. This
- will give you a brief summary of what each application does. You
- can also move the mouse pointer over the arrow at the right of
- the 'CmdOpts' option on these menus. This will display a dialogue
- box for entering additional input for the application. Some of
- the applications will have default 'CmdOpts' information, others
- will have none.
-
- One of the icons installed on the icon bar will be for the !Dummy
- application, which does nothing but echo some information to your
- screen and is a silhouette of a dummy's face. Click on this to
- see what happens. Then drag to it any file or directory icon and
- again observe the result. Try changing the 'CmdOpts' information
- for !Dummy and repeating the above.
-
-
- SUMMARY OF !BOOTA FUNCTIONS
-
- To summarise, !BootA provides the following services for its
- client applications:
-
- - installing the client application's icon on the icon bar when
- you double-click the mouse SELECT (or ADJUST) buttons on that
- application's icon in a directory viewer window
-
- - displaying a menu with a 'quit' choice when you click the
- mouse MENU button on the installed icon, and removing it from
- the icon bar if you chose this 'quit' option
-
- - providing a 'help' option in the same menu and displaying a
- brief help message if you chose this 'help' option
-
- - running the client application when you click the mouse
- SELECT or ADJUST buttons on the installed icon, or when you
- drag a file or directory to it (clicking ADJUST over the
- installed icon will also remove it from the icon bar)
-
- - responding to requests for help text from the '!Help'
- application (which displays the text in an 'Interactive help'
- window)
-
- - supplying additional input ('command options') to the client
- application when it is run.
-
- - changing the sprite used to display the client application
- icon on the icon bar when requested to do so (see description
- of BootAutil program below for more details of this).
-
- As touched on above, you do not need to install the !BootA
- application before installing the first client application on the
- icon bar. !BootA is automatically activated when you double-click
- on a client application icon in the directory viewer window, and
- becomes resident in memory at that point.
-
- Note that at this time, the client application itself has NOT
- been started and is NOT using any memory. Only !BootA is actually
- active and using memory. !BootA simply records the whereabouts of
- the client application directory so that it can issue the
- appropriate '*RUN' command when the time comes. However, this
- does mean that the client application directory must be
- accessible at that time - no problem with a hard disk, but with a
- floppy-disks RISC OS may call for the diskette to be re-inserted
- if it has been removed in the meantime.
-
- When you install a second client application (by double clicking
- on its icon in a directory viewer), this initially causes another
- copy of !BootA to start-up, but this second copy immediately
- realises that the first copy is active and passes the
- responsibility for the client application to it and then shuts
- down. This means that only one copy of !BootA will be resident in
- memory regardless of the number of client applications installed
- Note: installing a large number of client applications may cause
- !BootA's memory allocation to expand as it adds details of the
- additional applications to its internal tables.
-
- Double-clicking on the !BootA icon itself will cause !BootA to
- start up and to automatically install a list of client
- applications contained in the '!Init' file of the !BootA
- directory. This list is initially set up to include all the
- example client applications, so you should edit it to eliminate
- the ones you do not want installed in this way (note: !BootA will
- ignore any item in the list that begins with '|').
-
- See the '!Help' file in the !BootA directory for more details.
-
-
- CONTENTS OF !BOOTA APPLICATION DIRECTORY
-
- The !BootA application directory contains the following files:
-
- !Run - obey file to install and start up !BootA
- !RunImage - !BootA application program
- !Sprites - sprite file containing !BootA sprite
- !Help - help text (displayed when HELP chosen from filer menu)
- !Init - list of clients installed by !Run
- !Auto - suggested list of clients to start
- automatically from the desktop boot file
- BootAutil - additional utility for dynamically changing
- sprite used for client application icon on icon
- bar (see below for more details)
-
- SUMMARY OF THE EXAMPLE CLIENT APPLICATIONS
-
- The following example client applications accompany !BootA:
-
- !Dummy - demonstrates how a client application works
- !FileInfo - issues *FILEINFO command against a file
- !Ex - issues *EX command against a directory
- !SetType - issues *SETTYPE command against a file
- !Lock - issues *ACCESS ... LR command against a file
- !UnLock - issues *ACCESS ... WR command against a file
- !SetDir - sets the curently selected directory
- !CCompile - invokes the Acorn ANSI C compiler
- !Compare - compares two files
- !1stMake - converts text file to 1stWord+ file
- !1stUnMake - converts 1stWord+ file to text file
- !BasicEdit - loads Basic program file into the Basic Editor
- !Twin - loads file into the Twin editor
- !ARCtoIBM - changes end-of-line delimiters from LF to CRLF
- !IBMtoARC - changes end-of-line delimiters from CRLF to LF
- !BootA - removes IBM mainframe style line numbers from file
-
- See below for more details of these client applications.
-
- The client application directories will typically contain the
- following files:
-
- !Run - obey file to start up !BootA to install client icon
- !RunA - obey file used by !BootA to run the client appl.
- !HelpMsg - text for menu 'help' option & interactive !Help
- !CmdOpts - initial value for command options data
- !Sprites - usual RISC OS application sprites file
- !Boot - usual RISC OS application boot file
- !RunImage - application program
-
- Of these files, only '!Run' and '!RunA' are mandatory. All the
- others are optional, depending on the requirements of the
- particular client application.
-
- !BootA requires a minimum of 32K of memory. This is enough to
- install approximately ten to fourteen client applications,
- depending on the amount of help message text and command options
- text in total. This memory allocation will automatically expand
- if more space is needed, taking it from the computer's free
- memory (a feature of the shared C-library version 3.75 or later).
- If there is no more free memory, !BootA will display a normal
- Wimp_ReportError message and then terminate (which will
- automatically de-install all the client icons).
-
-
- C-SOURCE AND UNSHARED DIRECTORIES
-
- In addition to the example applications, there are two non-
- application directories accompanying !BootA: the 'C-source'
- directory and the 'Unshared' directory.
-
- The 'C-source' directory contains the C source and header files
- for the 1stMake, 1stUnMake, ARCtoIBM, IBMtoARC, UnNum and BootA
- application programs, plus two files of common functions:
- ArgFuncs and GetDirs (note that the source files have a file type
- of "00C" and the header files a file type of "00D" - this is a
- whim of mine and these filetypes correspond to sprites contained
- in the !CCompile application). It also contains the assembler
- source for the BootAutil program (which was assembled using the
- Acorn AAsm assembler), and the make files for the above.
-
- The directory "UnShared" contains versions of the !1stMake,
- !1stUnMake, !ARCtoIBM, !IBMtoARC, !UnNum and !BootA applications
- which do not use the shared C library. Instead the library
- functions are linked directly into the image file. This makes
- them bigger, but they will work if you do not have the correct
- version of the shared C library installed on your system. If you
- use the version of !BootA in this directory, it requires 80K of
- memory to run.
-
-
- ADDITIONAL DETAILS OF THE EXAMPLE CLIENT APPLICATIONS
-
- Most of these client applications are (deliberately) trivial in
- order to provide simple examples of the use of !BootA. Some of
- them are useless, or outclassed by other generally available
- applications, or obsoleted by RISC OS 3. Some may actually be
- useful.
-
-
- (1) !Dummy application
-
- This example application does nothing but display
- information on the screen using 'Echo' commands in its !RunA
- file. This information includes a mock-up of the command
- that !BootA generates to start up a client application, so
- providing an insight into how a client application is run.
- This is achieved by the following command in the !RunA
- file for !Dummy:
-
- Echo *WimpTask Run <Obey$Dir>.!RunA %*0
-
- which, after the values assigned to 'Obey$Dir' and '%*0'
- have been substituted for the variables, will display the
- equivalent of the command issued internally by !BootA.
-
- After installing the !Dummy icon (by double clicking on it),
- just drag to it the icon for any file, directory or
- application directory to see what 'Run' command will result.
- Experiment with changing the 'CmdOpts' value (via the
- 'CmdOpts' option on the menu) to see how this is inserted
- into the command.
-
- The !RunA file also includes other 'Echo' commands to
- display the system variables set by !BootA before issuing
- the 'Run' command.
-
-
- (2) !FileInfo application
-
- This trivial example provides a quick means of issuing the
- '*FileInfo' command against a file (or directory). The !RunA
- file includes the following command:
-
- FileInfo %*0
-
- It is, of course, obsoleted by RISC OS 3, which provides an
- 'Info' option on its filer menu.
-
-
- (3) !Ex application
-
- This trivial example provides a quick means of issuing the
- EX command against a directory. The !RunA file includes the
- following command:
-
- Ex <BootA$Dir>
-
- making use of one of the system variables set by !BootA
- before running the client application. If a file is dragged
- to the !Ex icon, then the result will be an '*EX' command
- issued for the directory containing that file.
-
-
- (4) !SetType application
-
- This example shows how easy it is to set up a simple
- application using a 'CmdOpts' value. The !RunA file contains
- the command:
-
- Settype %*0
-
- and the !CmdOpts file contains the default filetype of
- 'text'. Dragging a file to the installed 'SetType' icon will
- set that file's type to 'text'. Update the 'CmdOpts' data
- via menu option 'CmdOpts' to chose a different type. This
- application is less sophisticated than many of the 'SetType'
- applications already in the public domain and is obsoleted
- by RISC OS 3 which has a 'Set type' option on the filer
- menu.
-
-
- (5) !Lock application
-
- This !RunA file for this application includes the command:
-
- Access %*0
-
- and the CmdOpts value is set to 'LR'. Drag any file or
- directory icon to the !Lock icon to lock the file. This can
- often be much quicker and convenient than using the 'Access'
- option from the filer menu. This application is also
- obsoleted by RISC OS 3, which has a much more convenient
- 'Access' option on the filer menu.
-
-
- (6) !UnLock application
-
- This is almost identical to the !Lock application. The only
- difference is that CmdOpts value is set to 'WR' and the
- !Sprites file contains a different icon. Drag any file or
- directory icon to the !Unlock icon in order to unlock it.
- Like !Lock, this application is obsoleted by RISC OS 3.
-
-
- (7) !SetDir application
-
- Drag a directory to the installed SetDir icon to make that
- directory the 'current' directory. Dragging a file instead
- of a directory will set the current directory to the
- directory containing the dragged file. Click on the
- installed SetDir icon to set the root directory of the
- current drive as the current directory.
-
-
- (8) !CCompile application
-
- This application will invoke the AcornSoft ANSI C compiler
- to compile a C source file (assuming you have the C compiler
- installed in the library on your system!). The current
- directory is set to the parent of the one containing the
- dragged file (according to the normal practice for using the
- ANSI C compiler). The 'CmdOpts' are initially set to
- '-c -list' so that only compilation occurs and a compilation
- listing is generated (including any error messages).
-
-
- (9) !Compare application
-
- Drag two files to this icon to compare them to see if they
- are the same. The !RunA file invokes a program in the same
- directory to perform the actual comparison. This program is
- a very simple comparison utility which reports if the file
- contents and catalog information match. This example shows
- how easy it is to process two files by writing a !RunA obey
- file to save the details of the first file dragged to it
- until a second is dragged. The !RunA obey file for this
- client application also contains commands to run the
- BootAutil program in order to change the sprite used for
- the !Compare icon on the icon bar.
-
-
- (10) !1stMake application
-
- Drag a text file to the installed 1stMake icon to convert it
- to a 1stWord+ document. Click on the 1stMake icon to see the
- syntax of the 1stMake command. This application shows how a
- traditional command orientated utility (which 1stMake is)
- can be set up as a convenient-to-use desktop application.
-
-
- (11) !1stUnMake application
-
- Drag a 1stWord+ document file to the installed 1stUnMake
- icon to convert it to a plain text file. Click on the
- 1stUnMake icon to see the syntax of the 1stUnMake command.
- This application is just the reverse of 1stMake and is
- similarly structured.
-
-
- (12) !BasicEdit application
-
- Drag a basic program file here to load it into the Basic
- Editor (a text file can also be dragged and will be
- automatically tokenised by BASIC). The current directory is
- set to the directory containing the dragged file (and
- restored afterwards). The !RunA file also sets two function
- keys - f4 to issue an '*QUIT' command (to return to the
- desktop after returning from the Basic Edit to BASIC) and f2
- to issue an 'EDIT.' command (to re-invoke the Basic Editor
- after returning to BASIC). This application is obsoleted by
- the version of !Edit in RISC OS 3, which provides a desktop
- compliant way of editing BASIC programs.
-
-
- (13) !Twin application
-
- This application assumes you have Twin installed in the ADFS
- library on your system. Drag a file here to load it into
- Twin, set the colours to a nice (?) yellow on black and set
- the current directory to the directory containing the
- dragged file (and restore it afterwards). There are still
- some things that Twin does better than anything else!
-
-
- (14) !ARCtoIBM
-
- This application changes Archimedes end-of-line characters
- (LF) to DOS format end-of-line characters (CRLF). Drag a
- file here to convert it and replace the existing file with
- the updated file. Drag a directory here to convert all the
- files therein.
-
-
- (15) !IBMtoARC
-
- This application changes DOS format end-of-line characters
- (CRLF) to Archimedes end-of-line characters (LF). Drag a
- file here to convert it and replace the existing file with
- the updated file. Drag a directory here to convert all the
- files therein.
-
- With RISC OS 3, you can use this to convert DOS files in-
- situ on the DOS diskette, then edit the files using !Edit
- without the annoying '[0d]' at the end of each line, and
- finally convert the edited files back to DOS mode again in-
- situ by using !ARCtoIBM.
-
-
- (16) !UnNum application
-
- This application deletes line sequence numbers from IBM
- mainframe style files. It is obviously a specialised
- utility which was written to meet a particular need. Drag a
- text file to the !UnNum icon after it has been installed on
- the icon bar to 'unnumber' it, or drag a directory to the
- !UnNum icon to 'unnumber' all text files in the directory.
- These text files must be correctly sequenced numbered in the
- first place and must not contain any unprintable characters
- or they will be rejected by !UnNum.
-
-
- BOOTAUTIL PROGRAM
-
- This program is included in the !BootA application directory and
- can be executed from a client application's !RunA file by issuing
- a command such as the following:
-
- *Run <BootA$Appl>.BootAutil -sprite newname
-
- which will send a message to BootA requesting that sprite 'newname'
- should be used for displaying the client application's icon on the
- icon bar. The sprite 'newname' must already be loaded into the Wimp
- sprite pool (best done by including it in the !sprites file for the
- client application).
-
- The !Compare application provides an example of the use of
- BooyAutil. When first installed by BootA, the sprite used to
- display its icon on the icon bar is '!compare'. As soon as a file
- is dragged to this icon, the sprite is changed to 'compare0' to
- indicate that it is now waiting for the second file. When a
- second file is so dragged, the sprite is changed to 'compare1'
- and the comparison takes place. When the comparison is finished
- (or if you click on the icon to 'reset' it, rather than dragging
- a file to it), the sprite is changed back to '!compare'. The
- !sprites file for !Compare contains all three sprites:
- '!compare', 'compare0' and 'compare1'; so that when the directory
- viewer first sees the !Compare application directory, all three
- sprites are loaded into the Wimp sprite pool.
-
- When using replacement sprites in this way, all should be of the
- same size. The icon bounding box will be set by the first sprite
- displayed (i.e. the sprite with the same name as the application
- itself).
-
- BootAutil has a file type of 'absolute' which means that when run
- it loads into the application workspace at &8000. This is the
- same area used by other application programs (e.g. programs
- written in Basic, C, etc), so that it is not a good idea to issue
- the command to run BootAutil from within such an application
- program as BootAutil will replace the issuing program in the
- application workspace (although it could be used as a way of
- intentionally ending the application and updating its icon on the
- icon bar at the same time). BootAutil should normally be run from
- the client application's !RunA obey file.
-
- BootAutil accepts three arguments:
-
- -sprite xxxx - specifies name of sprite to be used (sprite
- should already be loaded into the Wimp
- sprite pool)
-
- -quit - requests BootA to remove the client's icon
- from the icon bar (same effect as 'Quit' on
- the menu)
-
- -handle nnnn - supplies the handle identifying the
- client's icon; BootA sets system variable
- 'BootA$Handle' to this handle before
- running the client's !RunA obey file; if
- '-handle' is not specified then BootAutil
- uses the value of the system variable.
-
-
- COPYRIGHT NOTICE
-
- BootA, BootAutil, 1stMake, 1stUnMake, ARCtoIBM, IBMtoARC and UnNum
- are subject to Copyright.
-
- Permission is granted by the author to any recipient of this
- material to use and make/disseminate copies of the application
- provided that no charges are made for doing so (other than to
- cover any cost of media or postage) and that this notice is
- included with all copies.
-
- Paul Witheridge - 15 December 1991.
-
-